import Header from '@/components/Header'
import { ThemedView } from '@/components/ThemedView'
import { router, useGlobalSearchParams } from 'expo-router'
import React, { useEffect } from 'react'
import { View, Text, StyleSheet, Image } from 'react-native'

export default function DetailScreen() {
  console.log('useGlobalSearchParams', useGlobalSearchParams())
  let { title, version, type, bot, icon, url, name } = useGlobalSearchParams()
  title = String(title)
  version = String(version)
  type = String(type)
  bot = String(bot)
  icon = String(icon)
  url = String(url)
  name = String(name)

  return (
    <ThemedView>
      <Header
        title={title}
        icon={icon}
      />
      <ThemedView style={styles.content}>{/* 显示更多详情内容 */}</ThemedView>
    </ThemedView>
  )
}

const styles = StyleSheet.create({
  header: {
    flexDirection: 'row',
    alignItems: 'center',
    justifyContent: 'space-between',
    paddingHorizontal: 20,
    paddingVertical: 10,
    backgroundColor: '#fff',
    shadowColor: '#000',
    shadowOffset: { width: 0, height: 2 },
    shadowOpacity: 0.1,
    shadowRadius: 4,
    elevation: 3,
  },
  image: {
    width: 50,
    height: 50,
    borderRadius: 25,
  },
  title: {
    fontSize: 24,
    fontWeight: 'bold',
  },
  content: {
    padding: 20,
  },
})
